﻿<%@ Page Language="C#"%>

<% string sModel = Request.QueryString["model"].ToLower();
   switch (sModel)
   {
       case "movie":
%>
<%
    MMYY.BLL.Type bll = new MMYY.BLL.Type();
    System.Collections.Generic.IList<MMYY.Model.Type> Itypes = bll.Get(0, 0);
    System.Collections.Generic.List<MMYY.Model.Type> types = Itypes as System.Collections.Generic.List<MMYY.Model.Type>;
    int i = 1; int num = types.Count + 2; int j = 1; int subnum = bll.GetSubTypeNum() + 9;

 %>
<div class="left-search">
    <form onsubmit="search('Movie');return false;">
        <input name="keywords" value="快速搜索" type="text" onclick="this.value='';" id="keywords">
        <input type="button" class="submit" value="" onmousedown="search('Movie');">
    </form>
</div>
<div class="left-menu">
    <h1>
        <a href="javascript:void(0)" onclick="sh(<%=i%>,<%=num %>)">
            <img src="images/left-menu-close.gif" id="lmp<%=i%>">影片推荐</a></h1>
    <ul id="lm<%=i%>" style="display: block;">
        <li><a href="javascript:void(0)" onclick="go_list('movie','pic/index.aspx?typeid=0&amp;desc=1&amp;page=1',<%=j%>,<%=subnum%>);"
            class="f1" id="lk<%=j%>">新片上映</a></li>
        <li><a href="javascript:void(0)" onclick="go_list('movie','pic/index.aspx?typeid=0&amp;desc=2&amp;page=1',<%=++j%>,<%=subnum%>);"
            id="lk<%=j%>">最近更新</a></li>
        <li><a href="javascript:void(0)" onclick="go_list('movie','pic/index.aspx?typeid=0&amp;desc=3&amp;page=1',<%=++j%>,<%=subnum%>);"
            id="lk<%=j%>">今日排行</a></li>
        <li><a href="javascript:void(0)" onclick="go_list('movie','pic/index.aspx?typeid=0&amp;desc=4&amp;page=1',<%=++j%>,<%=subnum%>);"
            id="lk<%=j%>">评分排行</a></li>
        <li><a href="javascript:void(0)" onclick="go_list('movie','pic/index.aspx?typeid=0&amp;desc=5&amp;page=1',<%=++j%>,<%=subnum%>);"
            id="lk<%=j%>">网友推荐</a></li>
        <li><a href="javascript:void(0)" onclick="go_list('movie','pic/index.aspx?typeid=0&amp;desc=6&amp;page=1',<%=++j%>,<%=subnum%>);"
            id="lk<%=j%>">点击排行</a></li>
    </ul>
</div>
<div class="hackbox"></div>
<%
    
    foreach (MMYY.Model.Type t in types)
    {
        ++i;    
%>


<div class="left-menu">
    <h1>
        <a href="javascript:void(0)" onclick="sh(<%=i%>,<%=num %>)">
            <img src="images/left-menu-open.gif" id="lmp<%=i%>"><% =t.m_name %></a></h1>
    <ul id="lm<%=i%>" style="display: none;">
        <%
            System.Collections.Generic.IList<MMYY.Model.Type> subItypes = bll.Get(t.m_id, 0);
            System.Collections.Generic.List<MMYY.Model.Type> subTypes = subItypes as System.Collections.Generic.List<MMYY.Model.Type>;
            foreach (MMYY.Model.Type subT in subTypes)
            {
        %>
        
        <li><a href="javascript:void(0)" onclick="go_list('movie','pic/index.aspx?typeid=<%=subT.m_id %>&amp;desc=0&amp;page=1',<%=++j%>,<%=subnum%>);"
            id="lk<%=j%>"><%=subT.m_name%></a></li>
       <%         
            }
       %>
    </ul>
</div>
<div class="hackbox"></div>
<%        
    } ++i;
%>

<div class="left-menu">
    <h1>
        <a href="javascript:void(0)" onclick="sh(<%=i%>,<%=num %>)">
            <img src="images/left-menu-open.gif" id="lmp<%=i%>">工具箱</a></h1>
    <ul id="lm<%=i%>" style="display: none;">
        <li><a href="javascript:void(0)" id="lk<%=++j%>" onclick="go_top('Favidslink');select_link(<%=j%>,<%=subnum%>);">
            <img src="images/plug-fav.gif">影片收藏</a></li>
        <li><a href="javascript:void(0)" id="lk<%=++j %>" onclick="go_top('Tipidslink');select_link(<%=j%>,<%=subnum%>);">
            <img src="images/plug-tip.gif">更新提醒</a></li>
        <li><a href="javascript:void(0)" id="lk<%=++j%>" onclick="open_url('open_supersearch');select_link(<%=j%>,<%=subnum%>);">
            <img src="images/plug-search.gif">影片查询</a></li>
    </ul>
</div>
<div class="hackbox">
</div>
<%           
           break; 
       case "tv":
%>
<div class="left-search">
    <form onsubmit="search('Tv');return false;">
        <input name="keywords" value="输入地区或频道名" type="text" onclick="this.value='';" id="keywords2">
        <input type="button" class="submit" value="" onmousedown="search('Tv');">
    </form>
</div>
<div class="left-menu">
    <h1>
        <a href="javascript:void(0)" onclick="sh(1,3)">
            <img src="images/left-menu-close.gif" id="Img7">高清直播</a></h1>
    <ul id="Ul7">
        <li><a href="javascript:void(0)" onclick="go_list('tv','?Tv_Genre=0&amp;Tv_Recommended=1',1,8);"
            id="A34">推荐频道</a></li>
        <li><a href="javascript:void(0)" onclick="go_list('tv','?Tv_Genre=0&amp;Tv_Recommended=0',2,8);"
            id="A35" class="f1">热门频道</a></li>
    </ul>
</div>
<div class="hackbox">
</div>
<div class="left-menu">
    <h1>
        <a href="javascript:void(0)" onclick="sh(2,3)">
            <img src="images/left-menu-open.gif" id="Img8">频道分类</a></h1>
    <ul id="Ul8" style="display: none;">
        <li><a href="javascript:void(0)" onclick="go_list('tv','?Tv_Genre=38',3,8);" id="A36">国内卫视</a></li>
        <li><a href="javascript:void(0)" onclick="go_list('tv','?Tv_Genre=39',4,8);" id="A37">新闻资讯</a></li>
        <li><a href="javascript:void(0)" onclick="go_list('tv','?Tv_Genre=40',5,8);" id="A38">体育竞技</a></li>
        <li><a href="javascript:void(0)" onclick="go_list('tv','?Tv_Genre=41',6,8);" id="A39">影音娱乐</a></li>
        <li><a href="javascript:void(0)" onclick="go_list('tv','?Tv_Genre=42',7,8);" id="A40">各地电视</a></li>
    </ul>
</div>
<div class="hackbox">
</div>
<%
           break;
       default:
%>

<%           
           break;
   } 
%>